//
//  RecvAndSendPacketTool.h
//  Fotile
//
//  Created by AllenKwok on 16/5/30.
//  Copyright © 2016年 xlink.cn. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GatewayPacketModel.h"

// add
//#import "FTDataSource.h"
#import "XLinkExportObject.h"
#import "XLDeviceEntity.h"
#import "PacketModel.h"

@interface RecvAndSendPacketTool : NSObject

+ (instancetype)share;

/**
 *  处理接收的数据
 *
 *  @param data   接收的数据包
 *  @param device 设备
 */
- (void)recvData:(NSData *)data withDevice:(XLDeviceEntity *)device;


/**
 *  发送数据
 *
 *  @param packetModel 数据包
 *  @param deviceModel 接收数据的设备
 */
+ (void)sendPacket:(PacketModel *)packetModel toDevice:(DeviceModel *)deviceModel;

///发送网关数据包
- (void)sendGatewayPacketModel:(GatewayPacketModel *)model;

@end
